package package4;

public class Encapsulation {
    private String name;        //私有,只能在类内部访问
    public String getName(){
        return name;
    }
    public void setName(String newName){
        this.name=newName;
    }
}
